package com.telecom.cms.service;

import java.util.List;
import com.telecom.cms.dao.*;
import com.telecom.cms.dto.*;


public class CampMenuMgr {
   
	public void savemainmenu(CampMainMenu campmainmenu){
		(new CampMainMenuDAO()).insert(campmainmenu);
	}
	
	public void  deletemainmenu(CampSeg campseg){
		(new CampSegDAO()).delete(campseg);
	}
	
	public List findallmainmenu(){
		List result=(new CampMainMenuDAO()).findAll();
		return result;
	}
	
	/*public List findmenuauthbyrole(String roleid){
		List result=(new CampMenuAuthDAO()).findAll(Integer.parseInt(roleid));
		return result;
	}*/
	public List findallleftmenu(){
		List result=(new CampLeftMenuDAO()).findAll();
		return result;
	}
	
	public List findallsltleftmenu(String roleid){
		List result=(new CampLeftMenuAuthDAO()).findAll(Integer.parseInt(roleid));
		return result;
	}
	
	public List findallsltmainmenu(String roleid){
		List result=(new CampMenuAuthDAO()).findAll(Integer.parseInt(roleid));
		return result;
	}
	
	public CampMainMenu findmainmenubyid(int menuid){
		return (new CampMainMenuDAO()).findById(menuid);
	}
	
	public void saveleftmenugroup(CampLeftMenuGroup campleftmenugroup){
		(new CampLeftMenuGroupDAO()).insert(campleftmenugroup);
	}
	
	public List findleftmenugroupbyid(String mmenuid){
		return (new CampLeftMenuGroupDAO()).findByMenuId(Integer.parseInt(mmenuid));
	}
	
	public void saveleftmenu(CampLeftMenu campleftmenu){
		(new CampLeftMenuDAO()).insert(campleftmenu);
	}
	
	public List findleftmenubygroupid(String menugroupid){
		return (new CampLeftMenuDAO()).findAllByGroupId(Integer.parseInt(menugroupid));
	}
}
